<template>
  <div>
        <img src="./assets/7ea46e9113a018df2cfaab7d60fae2aa.jpeg" alt="" v-show= 'flag'>
        <button @click= 'fn'>点击以后显示和隐藏</button>
   </div>
</template>
 
<script>
export default {
  data() {
    return {
        flag: true
    };
  },
  methods: {
    fn() {
        this.flag = !this.flag
    }
  }
};
</script>

<style scoped>
     
</style>